package org.jeecg.modules.inspection.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.jeecg.modules.system.entity.BaseEntity;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;
import java.util.List;


/**
 * @Description: 巡检主表
 * @Author: jeecg-boot
 * @Date:   2019-09-26
 * @Version: V1.0
 */
@Data
@TableName("process_inspection")
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value="process_inspection对象", description="巡检主表")
public class Inspection extends BaseEntity {
    
	/**id*/
	@TableId(type = IdType.UUID)
    @ApiModelProperty(value = "id")
	private String id;
	/**当前路线巡检人ID*/
	@Excel(name = "当前路线巡检人ID", width = 15)
    @ApiModelProperty(value = "当前路线巡检人ID")
	private String userId;
	/**tenantId*/
	@Excel(name = "tenantId", width = 15)
    @ApiModelProperty(value = "tenantId")
	private String tenantId;
	/**公司*/
	@Excel(name = "公司", width = 15)
    @ApiModelProperty(value = "公司")
	private String companyId;
	/**所属管理处*/
	@Excel(name = "所属管理处", width = 15)
    @ApiModelProperty(value = "所属管理处")
	private String officeId;
	/**归属条线(0:客服 1:保洁 2: 保安 3:工程)*/
	@Excel(name = "归属条线", width = 15)
	@ApiModelProperty(value = "归属条线")
	private Integer type;
	/**巡检周期值*/
	@Excel(name = "巡检周期值", width = 15)
	@ApiModelProperty(value = "巡检周期值")
	private Integer period;
	/**巡检周期类型: day 天 week 周 month 月 year 年*/
	@Excel(name = "巡检周期类型", width = 15)
	@ApiModelProperty(value = "巡检周期类型")
	private String periodType;
	/**当前线路ID*/
	@Excel(name = "当前线路ID", width = 15)
    @ApiModelProperty(value = "当前线路ID")
	private String configLineId;
	/**超时时间*/
	@Excel(name = "超时时间", width = 20, format = "yyyy-MM-dd")
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern="yyyy-MM-dd")
    @ApiModelProperty(value = "超时时间")
	private Date overtimeDate;
	/**巡检开始时间*/
	@Excel(name = "巡检开始时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
	@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
	@ApiModelProperty(value = "巡检开始时间")
	private Date processStartTime;
	/**巡检结束时间*/
	@Excel(name = "巡检结束时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
	@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
	@ApiModelProperty(value = "巡检结束时间")
	private Date processEndTime;
	/**巡检日期*/
	@Excel(name = "巡检日期", width = 15, format = "yyyy-MM-dd")
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern="yyyy-MM-dd")
    @ApiModelProperty(value = "巡检日期")
	private Date processDay;
	/**巡检状态: 100 未开时 200 巡检中 300巡检完成 400:强制结束*/
	@Excel(name = "巡检状态: 100 未开时 200 巡检中 300巡检完成 400:强制结束", width = 15)
    @ApiModelProperty(value = "巡检状态: 100 未开时 200 巡检中 300巡检完成 400:强制结束 500:超时未检")
	private Integer status;
	/**创建者*/
	@Excel(name = "创建者", width = 15)
    @ApiModelProperty(value = "创建者")
	private String createBy;
	/**创建时间*/
	@Excel(name = "创建时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd ")
    @ApiModelProperty(value = "创建时间")
	private Date createTime;
	/**更新者*/
	@Excel(name = "更新者", width = 15)
    @ApiModelProperty(value = "更新者")
	private String updateBy;
	/**更新时间*/
	@Excel(name = "更新时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "更新时间")
	private Date updateTime;
	/**备注信息*/
	@Excel(name = "备注信息", width = 15)
    @ApiModelProperty(value = "备注信息")
	private String remarks;
	/**删除标记*/
	@Excel(name = "删除标记", width = 15)
    @ApiModelProperty(value = "删除标记")
	private String delFlag;

	@TableField(exist = false)
	private String lineName;
    @TableField(exist = false)
	private String realname;
	@TableField(exist = false)
	private String startRq;

	@TableField(exist = false)
	private String endRq;
	@TableField(exist = false)
	private List<PinspetionArea> pinspetionAreas;
	@TableField(exist = false)
	private List<PinspectionItem> pinspectionItems;

	/** 异常数量 */
	@TableField(exist = false)
	private Integer exceptionCount;

	/** 解决异常数量 */
	@TableField(exist = false)
	private Integer comfirmCount;

	@TableField(exist = false)
	private String userName;

	@TableField(exist = false)
	private String officeName;

	@TableField(exist = false)
	private String statusName;

	@TableField(exist = false)
	private String typeName;

	@TableField(exist = false)
	private String periodName;
	private String quadrillage;
	private Integer stepNumber;
}
